RedirectPermanent vs RewriteRule [R]
Posted
by
notbrain
on Server Fault
See other posts from Server Fault
or by notbrain
Published on 2010-08-09T18:06:42Z
Indexed on
2012/03/31
23:34 UTC
Read the original article
Hit count: 195
I currently have a perm_redirects.conf file that gets included into my apache config stack where I have lines in the format
RedirectPermanent /old/url/path /new/url/path
It looks like I'm required to use an absolute URL for the new path, e.g.: http://example.com/new/url/path
. In the logs I'm getting "incomplete redirect target /new/url/path was corrected to http://example.com/new/url/path." (paraphrased).
In the 2.2 docs for RewriteRule
, at the bottom they show the following as being a valid redirect, with only the url-paths instead of an abs URL for the right hand side of the redirect:
RewriteRule ^/old/url/path(.*) /new/url/path$1 [R]
But I can't seem to get that format to work to replicate the functionality of the RedirectPermanent
version. Is this possible?
© Server Fault or respective owner